<template>
  <div class="others">
    <a class="history-trade" href="javascript:;" @click="toRecord">
      <span>TA的历史交易记录</span>

      <div class="forward">
        <i class="iconfont icon-xiangyou"></i>
      </div>
    </a>
  </div>
</template>

<script>
  import RemoteDAO from 'common/remoteDAO'
  import CommonUtil from 'common/common.util'
  import LocalDAO from 'common/localDAO'

  export default {
    data () {
      return {}
    },
    props:{
      clientId:{
        type:String
      }
    },
    methods:{
      toRecord(){
        var self = this;
        var nickname = LocalDAO.getNickname();
        if (typeof(nickname) === "undefined" || nickname === "") {
          RemoteDAO.callNativeLogin(function(response) {
            window.location.reload(true);
          });
        } else {
          self.$router.push({path:"/records",query:{userCode:self.clientId}})
        }
      }
    }
  }
</script>

<style scoped>

</style>
